﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web.Master" AutoEventWireup="true" CodeBehind="product3.aspx.cs" Inherits="UI.product" %>
<%@ Import Namespace="Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<div class="product">
    <div class="title">精彩视频 <div class="search"><button onclick="return search()">搜索</button></div><div class="keyword"><input id="keyword" type="text" placeholder="输入视频名称" value="<%=keyword %>"/></div></div>
    <div class="hr"></div>
    <div class="searchbar">
    <%
       if (typeid == 0)
      { %>
        <a href="product.aspx?typeid=0" style="border-left:2px solid #44a8f2">全部</a>
    <%}
      else
      { %>
        <a href="product.aspx?typeid=0">全部</a>
    <%} %>
    <% foreach (ProductTypeInfo info in producttype)
       {
           string color="";
           if (info.id == typeid) {
               color = "border-left:2px solid #44a8f2";
           }
           %>
    <a href="product.aspx?typeid=<%=info.id %>" style="<%=color%>"><%=info.name %></a>
    <%} %>
    </div>
    <div class="list">
    <asp:Repeater ID="Repeater1" runat="server">
    <ItemTemplate>
    <%if (num == 0)
      { %>
      <div class="bigitem">
         <div class="img"><a href="productinfo.aspx?id=<%#Eval("id") %>"><img src='<%#Eval("img") %>' width="220"/></a></div>
         <div class="name"><a href="productinfo.aspx?id=<%#Eval("id") %>"><%#Eval("name") %></a></div><i class="fa fa-play" onclick=show_video('<%#Eval("path") %>')></i>
    </div>
    <%}else{ %>
    <div class="item">
         <div class="img"><a href="productinfo.aspx?id=<%#Eval("id") %>"><img src='<%#Eval("img") %>' width="220"/></a></div>
         <div class="name"><a href="productinfo.aspx?id=<%#Eval("id") %>"><%#Eval("name") %></a></div><i class="fa fa-play" onclick=show_video('<%#Eval("path") %>')></i>
    </div>
    <%} num++;%>
    </ItemTemplate>
    </asp:Repeater>
    <%if (count == 0)
      { %>
      <div style="width:1000px; text-align:center; color:#4f4e4e; font-size:14px;">没有找到相关数据</div>
    <%} %>
        
    </div>
    <div class="divF34">
                    <input id="recordcount" type="hidden" value="<%=count%>" />
                    <input id="pagesize" type="hidden" value="<%=pagesize%>" />
                    <input id="pageindex" type="hidden" value='<%=pageindex%>' />
                    <div style="float:right"><script type="text/javascript" src="/js/pager.js"></script></div>
        </div>
</div>
<script>
    function search() {
        window.location.href = "product.aspx?typeid=<%=typeid %>&pageindex=<%=pageindex%>&keyword=" + $("#keyword").val();
        return false;
    }

</script>
</asp:Content>
